package com.shujia.jdbc.pool;

import java.sql.Connection;

public class ConnectionPoolTest {

    public static void main(String[] args) throws Exception {
//        ShujiaConnection shujiaCon = ShujiaConnectionPool.getConnection();
//        Connection connection = shujiaCon.getConnection();
//        System.out.println(connection);

        for(int i = 1; i <= 11; i++) {
            ShujiaConnection shujiaCon = ShujiaConnectionPool.getConnection();
            System.out.println(shujiaCon.getConnection());

            if(i == 3) {
                shujiaCon.close();
            }

        }
    }
}
